package LibraryManagementSystem.impl;

import LibraryManagementSystem.IOperation;
import LibraryManagementSystem.book.Bookcase;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2022/10/22 8:05
 */
public class DelOperation implements IOperation {
    @Override
    public void work(Bookcase bookcase) {
        System.out.println("您正在进行书籍下架操作");
        System.out.println("请输入要下架的书籍名称:");
        String bookName = scanner.next();
        if (bookcase.deleteBooks(bookName)){
            System.out.println("下架成功！");
        }else {
            System.out.println("下架失败，请检查输入！");
        }
    }
}
